package Interface.Producao;

import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.PlainDocument;

public class DigitaDouble extends PlainDocument{
        @Override
    public void insertString(int i, String string, AttributeSet as) throws BadLocationException {
        super.insertString(i, string.replaceAll("[^0-9|^.]", null), as);
    }
    @Override
    public void replace(int i, int i1, String string, AttributeSet as) throws BadLocationException {
        super.replace(i, i1, string.replaceAll("[^0-9|^.]", null), as);
    }
}
